const express = require('express');
const router = express.Router();
const userHandle = require('../router_handle/user')
const userManaHandle = require('../router_handle/userMana')
const expressJoi = require('@escook/express-joi');
const { reg_login_schema } = require('../schema/user');
// 用户数据添加（同注册）
router.post('/users/reguser', expressJoi(reg_login_schema), userHandle.regRouter)
// 用户数据的删除
router.delete('/users/:id', userManaHandle.deleteRouterById)
// 用户数据的查询
router.get('/users/:id', userManaHandle.inquireRouterById)
// 用户列表查询
router.get('/users', userManaHandle.usersRouter)
// 用户信息更改
router.put('/users/:id', userManaHandle.editUserRouter)
module.exports = router;